import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

Vue.config.productionTip = false;


import { Button,Cell,NavBar,Icon,Form,Field,Tabbar, TabbarItem,Tab,Tabs,} from 'vant';
import axios from 'axios';
import { Toast } from 'vant';
import { Popup } from 'vant';
import { Picker } from 'vant';

axios.defaults.baseURL='https://d33a5037-6c63-4e92-8bb1-30018ab701ea.bspapp.com/http'
Vue.prototype.$http=axios;

Vue.use(Button);//组件全局挂在的方案

Vue.use(Cell);
Vue.use(NavBar);
Vue.use(Icon);
Vue.use(Form);
Vue.use(Field);
Vue.use(Tabbar);
Vue.use(TabbarItem);
Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Toast);
Vue.use(Popup);
Vue.use(Picker);




new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')



let token=localStorage.getItem('token');
if(!token){

}else{
  store.dispatch('getuserinfo',token)
}